﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DataTier.Model.Entities
{
    public partial class Reminder
    {
        public void CalculateIsOverdue(int odometer)
        {
            IsOverdue = false;
            if (DueDate.HasValue && DueDate.Value < DateTime.UtcNow) IsOverdue = true;
            if (DueDistance.HasValue && DueDistance.Value < odometer) IsOverdue = true;
        }
    }
    
}
